home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.3 KB | 49 lines | [TEXT/GEOL] |
- Item 2298687 26-Sept-89 20:28
-
- From: D1220 Vari-Lite, Andy Meldrum,PRT
-
- To: MACAPP.TEST MacApp SQA Team
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Splash Bug
-
- There is a bug in the MacApp Globalfunction GetNewCenteredDialog. Here is the
- original, plus fix.
-
- FUNCTION GetNewCenteredDialog(dialogID: INTEGER; dStorage: Ptr; behind:
- WindowPtr): DialogPtr;
-
- VAR
- dlogTemplate: DialogTHndl;
-
- BEGIN
- (* !!! Nil out the returned Value for good luck & that sort of thing *)
- GetNewCenteredDialog := NIL;
- (* !!! All better now *)
-
- SetCursor(arrow);
- SetEmptyRgn(gCursorRgn); { Make sure it gets changed back }
- dlogTemplate := DialogTHndl(GetResource('DLOG', dialogID));
- IF dlogTemplate <> NIL THEN
- BEGIN
- CenterRectOnScreen(dlogTemplate^^.boundsRect, TRUE, TRUE, TRUE);
- GetNewCenteredDialog := GetNewDialog(dialogID, dStorage,
- behind);
- END
- ELSE
- BEGIN
- SysBeep(2); { At least give some indication }
- {$IFC qDebug}
- ProgramBreak(ConcatNumber('Unable to find ‘DLOG’ resource ',
- dialogID));
- {$ENDC}
- END;
- END;
-
- If I wasn't so cack handed with Rez I'd never have found this !!
-
- Andy.
-
-
-